import request from '@/utils/request'
// 查询流程任务列表
export function listTask(query) {
    return request({
        url: '/flow/task/list',
        method: 'get',
        params: query
    })
}
// 查询流程任务详细
export function getTask(ID) {
    return request({
        url: '/flow/task/' + ID,
        method: 'get'
    })
}
// 新增流程任务
export function addTask(data) {
    return request({
        url: '/flow/task',
        method: 'post',
        data: data
    })
}
// 修改流程任务
export function updateTask(data) {
    return request({
        url: '/flow/task',
        method: 'put',
        data: data
    })
}
// 删除流程任务
export function delTask(ID) {
    return request({
        url: '/flow/task/' + ID,
        method: 'delete'
    })
}

export function getTodoList(query) {

    return request({
        url: '/flow/task/todoList/',
        method: 'get',
        params: {
            ...query
        }
    })
}
export function getTaskDetail({curTaskId,processDefinitionId}) {
    return request({
        url: '/flow/task/getTaskDetail',
        method: 'post',
        data: {
            curTaskId,
            processDefinitionId
        }
    })
}
